package com.candy.dao;

import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.Set;

public class Test01 {

    public static void main(String[] args) {
        test02();
    }

    public static void test02() {
       int num= DBDriver.update("INSERT INTO userinfo(username,userpwd,useraddress,usertel) VALUES('敖丙','123456','东海龙宫','15588996989');");
        System.out.println(num);
    }

    public static void test01() {
        LinkedList<LinkedHashMap<String,Object>> lp= DBDriver.query("SELECT * FROM employees;");
        for(LinkedHashMap<String,Object> ls:lp){
//                取出map集合中的所有key
            Set keys=ls.keySet();
//                对set集合进行遍历
            for(Object key:keys){
                System.out.print(key+":"+ls.get(key)+"\t");
            }
            System.out.println();
        }
    }
}
